//
//  UserInfoModel.swift
//  d11
//
//  Created by rhonin on 2018/10/30.
//  Copyright © 2018年 Tech_001. All rights reserved.
//

import UIKit
import SwiftyJSON
class UserInfoModel: NSObject {
    var username = ""
    var realname = ""
    var dob = ""
    var email = ""
    var mobile = ""
    var profile_address = ""
    var profile_street = ""
    var joinpwd = ""
    var gender = ""
    var wdPassword = ""
    var can_cancel_mobile = 0  //0 可取消。 1不可取消
    class func changeJsonTomModel(json:JSON) -> UserInfoModel {
        let model = UserInfoModel()
        model.username = json["username"]["value"].stringValue
        model.realname = json["realname"]["value"].stringValue
        model.dob = json["dob"]["value"].stringValue
        
        model.email = json["email"]["value"].stringValue
        model.mobile = json["mobile"]["value"] .stringValue
        model.profile_address = json["profile_address"] .stringValue
        model.profile_street = json["profile_street"].stringValue
        model.joinpwd = json["joinpwd"].stringValue
        model.wdPassword = json["wdPassword"].stringValue
        model.can_cancel_mobile = json["mobile"]["can_cancel"].intValue
        return model
    }
    
    
    
}
